package com.ikaros.emnus;

import lombok.Getter;

/**
 * Created by Ikaros on 2017/10/11.
 */
@Getter
public enum StatusEnum {
    DISABLE(0,"禁用"),
    ACTIVATION(1,"正常");

    private Integer code;
    private String msg;

    StatusEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public static StatusEnum getStatusEnum(int index){
        for (StatusEnum code : StatusEnum.values()) {
            if (code.getCode()==index){
                return code;
            }
        }
        return null;
    }
}
